(define (merge loi1 loi2)
    (merge-aux `() loi1 loi2)
)

(define (merge-aux loi loi1 loi2)
    (cond 
        ((null? loi1) (append loi loi2))
        ((null? loi2) (append loi loi1))
        ((>= (car loi1) (car loi2))
            (merge-aux 
                (append loi (list (car loi2)))
                loi1 
                (cdr loi2)
            )
        )
        (else
            (merge-aux 
                (append loi (list (car loi1)))
                (cdr loi1) 
                loi2
            )
        )
    )
)

(display
    (merge `(1 4) `(1 2 8))
)

(display
    (merge `(35 62 81 90 91) `(3 83 85 90))
)
